<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/connopen.asp"-->
<!--#include file="lib/asp-common-lib.asp"-->
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CC的办公系统</title>
<!--#include file="lib/plugins.asp"-->
<style type="text/css">
	.ui-datepicker table {
		border: 0;
	}
</style>
<script type="text/javascript">
	$(function() {
	});
</script>
<!--#include file="lib/js-google-analytics.asp"-->
</head>

<body>
<!--#include file="lib/header.asp"-->
<!--#include file="lib/nav.asp"-->
<div id="main">
<!--#include file="lib/col1.asp"-->
<!--#include file="lib/col2.asp"-->
	<div id="col3" role="main">
		<div id="col3_content" class="clearfix">
		
		<%
			xls_id=request("xls_id")

		%>
			<table class="full">
				<thead>
					<tr>
						<th>序号</th>
						<th>部门</th>
						<th>名字</th>
						<th>电话</th>
						<th>权重</th>
						<th>费用</th>
					</tr>
				</thead>
				<tbody>
		<%
			sql = "select * from report where report_xls="&xls_id&" order by report_index asc,report_empeindex asc,report_tele asc"
			Set rs = Server.CreateObject("ADODB.Recordset")
			rs.Open sql,conn,1,1
			sum_all=0
			empe_name=""
			dept_name=""
			sum_empe=0
			sum_dept=0
			do while not rs.eof
				if empe_name=rs("report_empe") then
					if rs("report_empe")="" then
						if dept_name=rs("report_dept") then
						
						
						else
						
						end if
					end if
					
				else
					empe_name=rs("report_empe")
					sum_empe=sum_empe+ccur(rs("report_fee")*rs("report_weight"))
				
				end if
		%>
					<tr>
						<td><%=rs.absoluteposition%></td>
						<td><%=rs("report_dept")%></td>
						<td><%=rs("report_empe")%></td>
						<td><a href="feetele.asp?xls_id=<%=xls_id%>&tele_num=<%=rs("report_tele")%>" title="核对账单"><%=rs("report_tele")%></a></td>
						<td align="right"><%=FormatPercent(rs("report_weight"),,-1)%></td>
						<td align="right"><%=FormatNumber(ccur(rs("report_fee")*rs("report_weight")),2,-1)%></td>
					</tr>
		<%
				sum_all=sum_all+ccur(rs("report_fee")*rs("report_weight"))
				rs.movenext
			loop
			rs.close
			set rs=nothing
		%>
				</tbody>
				<tfoot>
					<tr>
						<th></th>
						<th>合计</th>
						<th></th>
						<th></th>
						<th></th>
						<th><%=FormatCurrency(ccur(sum_all))%></th>
					</tr>
				</tfoot>
			</table>		
		
		</div>
	</div>
</div>
<!--#include file="lib/footer.asp"-->
</body>
</html>
<!--#include file="lib/connclose.asp"-->

